javascript error:

try: it defines a code block to run .

catch: it define a code block to handle any error

finally: it defines a code block to run regardless of the result.

throw: it defines a custom error.

how to use catch to display an error

javascript Throw errors

the rest of the part is in the newxt related html file.